package com.jxw.studyrecord;

import android.text.TextUtils;
import android.util.Log;

/* loaded from: classes.dex */
public class StudyRecordMiddleName extends StudyRecordBaseName {
    private static final String CH_BASE_WORD = "文科-基础词语";
    private static final String CH_CHAR_KNOWLEDGE = "文科-汉字知识";
    private static final String CH_CLASSIC_CH = "文科-文言文";
    private static final String CH_CLASSIC_POETRY = "文科-古诗词曲";
    private static final String CH_PUNCTUATION = "文科-标点符号";
    private static final String CH_READ = "文科-现代文阅读";
    private static final String CH_RHETORIC = "文科-修辞方法";
    private static final String CH_SENTENCE = "文科-句子知识";
    private static final String CH_WRITING = "文科-语文写作";
    private static final String EN_BASE_VOICE = "英语-基础语音";
    private static final String EN_GRAMMAR = "英语-英语语法";
    private static final String EN_LISTENING_TRAINING = "英语-听力训练";
    private static final String EN_READ = "英语-英语阅读";
    private static final String EN_SPOKEN = "英语-口语交际";
    private static final String EN_VOCABULARY = "英语-英语词汇";
    private static final String EN_WRITING = "英语-英语写作";
    private static final String MATH_EASY_WRONG_TOPIC = "理科-数学易错题汇";
    private static final String MATH_EQUATION = "理科-方程精解";
    private static final String MATH_FORMULA = "理科-公式大全";
    private static final String MATH_FUNC = "理科-函数解析";
    private static final String MATH_GEOMETRY = "理科-几何定理";
    private static final String MATH_OFTEN_TEST = "理科-数学常考知识";
    private static final String MATH_PERIODIC_TABLE = "理科-元素周期表";
    private static final String MATH_PREPARE_TEST = "理科-备战中高考";
    private static final String MORE_USER_GUIDE = "更多-使用指南";
    private static final String SYNSTUDYDD_CN = "同步点读-语文";
    private static final String SYNSTUDYDD_EN = "同步点读-英语";
    private static final String SYNSTUDYDD_MATH = "同步点读-数学";
    private static final String SYNSTUDYFD_BIOLOGY = "同步辅导-生物";
    private static final String SYNSTUDYFD_CHEMISTRY = "同步辅导-化学";
    private static final String SYNSTUDYFD_CN = "同步辅导-语文";
    private static final String SYNSTUDYFD_EN = "同步辅导-英语";
    private static final String SYNSTUDYFD_GEOGRAPHY = "同步辅导-地理";
    private static final String SYNSTUDYFD_HISTORY = "同步辅导-历史";
    private static final String SYNSTUDYFD_KEXUE = "同步辅导-科学";
    private static final String SYNSTUDYFD_MATH = "同步辅导-数学";
    private static final String SYNSTUDYFD_PHYSICS = "同步辅导-物理";
    private static final String SYNSTUDYFD_POLITICS = "同步辅导-政治";
    private static final String SYNSTUDY_BIOLOGY = "同步学习-生物";
    private static final String SYNSTUDY_CHEMISTRY = "同步学习-化学";
    private static final String SYNSTUDY_CN = "同步学习-语文";
    private static final String SYNSTUDY_EN = "同步学习-英语";
    private static final String SYNSTUDY_GEOGRAPHY = "同步学习-地理";
    private static final String SYNSTUDY_HISTORY = "同步学习-历史";
    private static final String SYNSTUDY_MATH = "同步学习-数学";
    private static final String SYNSTUDY_PHYSICS = "同步学习-物理";
    private static final String SYNSTUDY_POLITICS = "同步学习-政治";
    private static final String TAG = "StudyRecordMiddleName";

    public static String getName(String str, String str2, String str3) {
        if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2)) {
            Log.i(TAG, "getName(): packageName or className is empty");
            return null;
        }
        String onLineStudyName = getOnLineStudyName(str, str2, str3);
        if (TextUtils.isEmpty(onLineStudyName)) {
            String fileListName = getFileListName(str, str2, str3);
            if (TextUtils.isEmpty(fileListName)) {
                String dictName = getDictName(str, str2, str3);
                if (TextUtils.isEmpty(dictName)) {
                    String otherComName = getOtherComName(str, str2);
                    return (TextUtils.isEmpty(otherComName) && isSamePackageClassName(str, StudyRecordAPKInfo.PACKAGE_PERIODIC_TABLE, str2, StudyRecordAPKInfo.CLASS_PERIODIC_TABLE)) ? MATH_PERIODIC_TABLE : otherComName;
                }
                return dictName;
            }
            return fileListName;
        }
        return onLineStudyName;
    }

    private static String getOnLineStudyName(String str, String str2, String str3) {
        String str4;
        if (TextUtils.isEmpty(str3) || !str.equals(StudyRecordAPKInfo.PACKAGE_NAME_ON_LINE_STUDY)) {
            return null;
        }
        if (str2.equals(StudyRecordAPKInfo.CLASS_NAME_ON_LINE_STUDY)) {
            String fileName = getFileName(str3, true);
            if (TextUtils.isEmpty(fileName)) {
                return null;
            }
            if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_MID_EN_BASE_VOICE)) {
                str4 = EN_BASE_VOICE;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_MID_EN_VOCABULARY)) {
                str4 = EN_VOCABULARY;
            } else if (fileName.equals("口语交际")) {
                str4 = EN_SPOKEN;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_MID_EN_LISTENING_TRAINING)) {
                str4 = EN_LISTENING_TRAINING;
            } else if (fileName.equals("英语阅读")) {
                str4 = EN_READ;
            } else if (fileName.equals("英语语法")) {
                str4 = EN_GRAMMAR;
            } else if (fileName.equals("英语写作")) {
                str4 = EN_WRITING;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_MID_CH_CHAR_KNOWLEDGE)) {
                str4 = CH_CHAR_KNOWLEDGE;
            } else if (fileName.equals("基础词语")) {
                str4 = CH_BASE_WORD;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_MID_CH_SENTENCE)) {
                str4 = CH_SENTENCE;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_MID_CH_PUNCTUATION)) {
                str4 = CH_PUNCTUATION;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_MID_CH_RHETORIC)) {
                str4 = CH_RHETORIC;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_MID_CH_CLASSIC_POETRY)) {
                str4 = CH_CLASSIC_POETRY;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_MID_CH_CLASSIC_CH)) {
                str4 = CH_CLASSIC_CH;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_MID_CH_READ)) {
                str4 = CH_READ;
            } else if (fileName.equals("语文写作")) {
                str4 = CH_WRITING;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_MID_MATH_FUNC)) {
                str4 = MATH_FUNC;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_MID_MATH_GEOMETRY)) {
                str4 = MATH_GEOMETRY;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_MID_MATH_EQUATION)) {
                str4 = MATH_EQUATION;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_MID_MATH_EASY_WRONG_TOPIC)) {
                str4 = MATH_EASY_WRONG_TOPIC;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_MID_MATH_OFTEN_TEST)) {
                str4 = MATH_OFTEN_TEST;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_MID_MATH_PREPARE_TEST)) {
                str4 = MATH_PREPARE_TEST;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_MID_MATH_FORMULA)) {
                str4 = MATH_FORMULA;
            } else if (!fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_MORE_USER_GUIDE)) {
                return null;
            } else {
                str4 = MORE_USER_GUIDE;
            }
            return str4;
        } else if (str2.equals(StudyRecordAPKInfo.CLASS_NAME_ON_LINE_STUDY_LIST)) {
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_CHFD)) {
                return SYNSTUDYFD_CN;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_MATHFD)) {
                return SYNSTUDYFD_MATH;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_ENFD)) {
                return SYNSTUDYFD_EN;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_PHYSICSFD)) {
                return SYNSTUDYFD_PHYSICS;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_CHEMISTRYFD)) {
                return SYNSTUDYFD_CHEMISTRY;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_BIOLOGYFD)) {
                return SYNSTUDYFD_BIOLOGY;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_HISTORYFD)) {
                return SYNSTUDYFD_HISTORY;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_GEOGRAPHYFD)) {
                return SYNSTUDYFD_GEOGRAPHY;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_POLITICSFD)) {
                return SYNSTUDYFD_POLITICS;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_CHDD)) {
                return SYNSTUDYDD_CN;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_MATHDD)) {
                return SYNSTUDYDD_MATH;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_ENDD)) {
                return SYNSTUDYDD_EN;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_CH)) {
                return SYNSTUDY_CN;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_MATH)) {
                return SYNSTUDY_MATH;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_EN)) {
                return SYNSTUDY_EN;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_PHYSICS)) {
                return SYNSTUDY_PHYSICS;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_CHEMISTRY)) {
                return SYNSTUDY_CHEMISTRY;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_BIOLOGY)) {
                return SYNSTUDY_BIOLOGY;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_HISTORY)) {
                return SYNSTUDY_HISTORY;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_GEOGRAPHY)) {
                return SYNSTUDY_GEOGRAPHY;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_POLITICS)) {
                return SYNSTUDY_POLITICS;
            }
            return null;
        } else {
            return null;
        }
    }
}
